const mongoose = require('mongoose');
var Schema = mongoose.Schema;

var merchantSchema = new Schema({
    _id:String,
    account:String,
    name:String,
    address:String,
    imgHead:String,
    imgCard:String,
    star:Number,
    pwd:String,
    status:Number ,
    dish:[{type:String,ref:'Dish'}],
    comment:[{type:Schema.Types.ObjectId,ref:'Comment'}],
    order:[{type:Schema.Types.ObjectId,ref:'Order'}]
});

mongoose.model('Merchant',merchantSchema);